from fastapi import APIRouter

from app.corelibs.http_response import partner_success
from app.schemas.point_management.my_application_schemas import UserApplyDetailSchemas
from app.services.point_management.point_report_services import UserApplyDetailService

router = APIRouter()


@router.post('/userApplyDetail', description="申请明细")
async def user_apply_detail(params: UserApplyDetailSchemas):
    data = await UserApplyDetailService.list(params)
    return partner_success(data)


@router.post('/userApplyStatistics', description="申请统计")
async def user_apply_statistics(params: UserApplyDetailSchemas):
    data = await UserApplyDetailService.statistics_list(params)
    return partner_success(data)


@router.post('/points_rank', description="积分排行榜")
async def points_rank(params: UserApplyDetailSchemas):
    data = await UserApplyDetailService.points_rank(params)
    return partner_success(data)
